package com.shop.controller;


import com.shop.entity.Res;
import com.shop.service.ColorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2023-03-04
 */
@RestController
@RequestMapping("/color")
public class ColorController {
    @Autowired
    ColorService colorService;
    @GetMapping
    public Res getAll() {
        return Res.success(colorService.list());
    }
}

